import { http } from "@/uni-sub-base/service/request.js"

import { getBaseUrls } from "@/utils/appUrl.js"
let serviceName = "User/"
//获取当前登录员工信息
export function GetGuideInfo(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetGuideInfo" + path,
        data,
    })
}

//加入购物车
export function AddCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "AddCar",
        data,
    })
}
//获取购物车
export function GetCarList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetCarList",
        data,
    })
}
//获取客户收货地址列表
export function GetUserAddressList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserAddressList" + path,
        data,
    })
}
//新增或编辑客户收货地址
export function UpdateUserAddress(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "UpdateUserAddress" + path,
        data,
    })
}
//删除客户收货地址
export function DeleteUserAddress(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "DeleteUserAddress" + path,
        data,
    })
}

//识别收货地址
export function BatchSmartParse(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "DeleteUserAddress",
        data,
    })
}

//批量删除购物车商品
export function DeleteCar(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "DeleteCar" + path,
        data,
    })
}
//重置密码
export function InitPassword(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "InitPassword" + path,
    })
}
//修改员工密码
export function UpdatePassword(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "UpdatePassword" + path,
        data,
    })
}
//修改员工姓名
export function UpdateGuideName(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "UpdateGuideName" + path,
        data,
    })
}
//获取退货地址列表
export function GetReturnAddressList(data = {}, path = "") {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetReturnAddressList" + path,
        data,
    })
}
//识别地址
export function mapbatchSmartParse(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "BatchSmartParse",
        data,
    })
}

//获取切换商户数据
export function GetAdminUserSystemList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetAdminUserSystemList",
        data,
    })
}
//获取功能菜单
export function GetMenuList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetMenuList",
        data,
    })
}
export function GetPageModuleList(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetPageModuleList" + path,
    })
}
//修改购物车
export function UpdateCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "UpdateCar",
        data,
    })
}
//客户分析
export function GetUserAddInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserAddInfo",
        data,
    })
}
//客户增长趋势
export function GetUserAddTrend(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserAddTrend",
        data,
    })
}
//等级分析
export function GetUserGradeAnalysisInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserGradeAnalysisInfo",
        data,
    })
}
//客户分析
export function GetUserAnalysisInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserAnalysisInfo",
        data,
    })
}
//客户消费次数分析
export function GetOrderGroupByUser(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderGroupByUser",
        data,
    })
}
//客单分析
export function GetOrderUserPriceInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderUserPriceInfo",
        data,
    })
}
